home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / SVGALIB-.{2E / 0-README.{_E < prev    next >
Text File  |  1999-09-17  |  49KB  |  1,453 lines

  1.  
  2.  
  3.  
  4. svgalib(7)           Svgalib User Manual           svgalib(7)
  5.  
  6.  
  7. NAME
  8.        svgalib - a low level graphics library for linux
  9.  
  10. TABLE OF CONTENTS
  11.        0. Introduction
  12.        1. Installation
  13.        2. How to use svgalib
  14.        3. Description of svgalib functions
  15.        4. Overview of supported SVGA chipsets and modes
  16.        5. Detailed comments on certain device drivers
  17.        6. Goals
  18.        7. References (location of latest version, apps etc.)
  19.        8. Known bugs
  20.  
  21.  
  22. 0. INTRODUCTION
  23.        This is a low level graphics library for Linux, originally
  24.        based on VGAlib 1.2 by Tommy Frandsen. VGAlib supported    a
  25.        number  of  standard  VGA graphics modes, as well as Tseng
  26.        ET4000 high resolution 256-color modes. As of now, support
  27.        for  many  more    chipsets  has  been  added. See section 4
  28.        Overview of supported SVGA chipsets and modes
  29.  
  30.        It supports transparent virtual    console     switching,  that
  31.        is,  you can switch consoles to and from text and graphics
  32.        mode consoles using alt-[function key]. Also, svgalib cor-
  33.        rects  most  of    VGAlib's textmode corruption behaviour by
  34.        catching SIGSEGV, SIGFPE, SIGILL, and other fatal  signals
  35.        and  ensuring  that  a program is running in the currently
  36.        visible virtual console before setting a graphics mode.
  37.  
  38.        Note right here that SIGUSR1 and SIGUSR2 are used to  man-
  39.        age  console switching internally in svgalib.  You can not
  40.        use them in your programs.
  41.  
  42.        This version includes code to hunt for a free virtual con-
  43.        sole  on     its own in case you are not starting the program
  44.        from one (but instead over a network or modem login,  from
  45.        within  screen(1)  or  an  xterm(1)).  Provided there is a
  46.        free console, this succeeds if you  are    root  or  if  the
  47.        svgalib    calling     user own the current console. This is to
  48.        avoid people not using the console being     able  to  fiddle
  49.        with it.     On graceful exit the program returns to the con-
  50.        sole from which it was started.    Otherwise it  remains  in
  51.        text  mode  at the VC which svgalib allocated to allow you
  52.        to see any error     messages.  In    any  case,  any     I/O  the
  53.        svgalib    makes  in  text     mode (after calling vga_init(3))
  54.        will also take place at this new console.
  55.  
  56.        Alas, some games misuse their suid root priviledge and run
  57.        as  full     root  process.     svgalib  cannot  detect this and
  58.        allows Joe Blow User to open a new VC on the  console.  If
  59.        this  annoys  you, ROOT_VC_SHORTCUT in Makefile.cfg allows
  60.        you to disable allocating a new VC for root  (except  when
  61.  
  62.  
  63.  
  64. Svgalib 1.3.1         19 December 1998            1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. svgalib(7)           Svgalib User Manual           svgalib(7)
  71.  
  72.  
  73.        he  owns     the  current  console) when you compile svgalib.
  74.        This is the default.
  75.  
  76.        When the library is used by a program at     run-time,  first
  77.        the  chipset  is     detected  and    the appropriate driver is
  78.        used. This means that a graphics program will work on  any
  79.        card  that is supported by svgalib, if the mode it uses is
  80.        supported by the chipset driver for that card. The library
  81.        is upwardly compatible with VGAlib.
  82.  
  83.        The set of drawing functions provided by svgalib itself is
  84.        limited (unchanged from VGAlib) and unoptimized;     you  can
  85.        however    use  vga_setpage(3) and vga_getgraphmem(3) (which
  86.        points to the 64K VGA framebuffer) in a program or  graph-
  87.        ics library.  A fast external framebuffer graphics library
  88.        for linear and banked 1, 2, 3 and 4 bytes per pixel  modes
  89.        is  included  (it  also    indirectly  supports  planar  VGA
  90.        modes). It is documented in vgagl(7).
  91.  
  92.        One obvious  application     of  the  library  is  a  picture
  93.        viewer.    Several are available, along with animation view-
  94.        ers. See the 7. References at the end of this document.
  95.  
  96.        I have added a simple VGA textmode font restoration  util-
  97.        ity  (restorefont(1))  which  may  help if you suffer from
  98.        XFree86 textmode font corruption. It can also be     used  to
  99.        change  the  textmode  font.  It     comes    with  some  other
  100.        textmode        utilities:       restoretextmode(1)       (which
  101.        saves/restores textmode registers), restorepalette(1), and
  102.        the script textmode(1).    If you    run  the  savetextmode(1)
  103.        script  to  save     textmode  information to /tmp, you'll be
  104.        able  to     restore  textmode  by    running     the  textmode(1)
  105.        script.
  106.  
  107.  
  108. 1. INSTALLATION
  109.        Installation is easy in general but there are many options
  110.        and things you should keep in mind. This document  however
  111.        assumes that svgalib is already installed.
  112.  
  113.        If  you    need  information  on  installation see 0-INSTALL
  114.        which comes with the svgalib distribution.
  115.  
  116.        However, even after installation of the library you  might
  117.        need    to    configure      svgalib    using    the    file
  118.        /etc/vga/libvga.config.    Checkout section  4  Overview  of
  119.        supported SVGA chipsets and modes and libvga.config(5) for
  120.        information.
  121.  
  122.  
  123. 2. HOW TO USE SVGALIB
  124.        For basic svgalib usage (no mouse, no  raw  keyboard)  add
  125.        #include     <vga.h>  at  the  beginning  your  program.  Use
  126.        vga_init(3) as your first svgalib call. This will give  up
  127.  
  128.  
  129.  
  130. Svgalib 1.3.1         19 December 1998            2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. svgalib(7)           Svgalib User Manual           svgalib(7)
  137.  
  138.  
  139.        root privileges right after initialization, making setuid-
  140.        root binaries relatively safe.
  141.  
  142.        The function vga_getdefaultmode(3) checks the  environment
  143.        variable     SVGALIB_DEFAULT_MODE  for  a  default    mode, and
  144.        returns the corresponding  mode    number.     The  environment
  145.        string  can  either  be a mode number or a mode name as in
  146.        (G640x480x2,  G640x480x16,  G640x480x256     ,  G640x480x32K,
  147.        G640x480x64K,  G640x480x16M).   As  an example, to set the
  148.        default graphics mode to 640x480, 256 colors, use:
  149.  
  150.        export SVGALIB_DEFAULT_MODE=G640x480x256
  151.  
  152.        on the bash(1) command line. If a  program  needs  just    a
  153.        linear VGA/SVGA resolution (as required by vgagl(7)), only
  154.        modes where bytesperpixel in  the  vga_modeinfo    structure
  155.        returned     by  vga_getmodeinfo(3)     is greater or equal to 1
  156.        should be accepted (this is 0 for tweaked planar 256-color
  157.        VGA modes).
  158.  
  159.        Use  vga_setmode(graphicsmode) to set a graphics mode. Use
  160.        vga_setmode(TEXT) to restore textmode before program exit.
  161.  
  162.        Programs     that  use  svgalib must #include<vga.h>; if they
  163.        also use the external graphics library vgagl(7), you  must
  164.        also  #include<vgagl.h>.      Linking must be done with -lvga
  165.        (and -lvgagl before -lvga, if vgagl(7) is used).     You  can
  166.        save  binary  space by removing the unused chipset drivers
  167.        in Makefile.cfg if you only use specific chipsets. However
  168.        this reduces the flexibility of svgalib and has a signifi-
  169.        cant effect only when you use the  static  libraries.  You
  170.        should better use the shared libraries and these will load
  171.        only the really used parts anyway.
  172.  
  173.        Functions in the vgagl(7) library  have    the  prefix  gl_.
  174.        Please see vgagl(7) for details.
  175.  
  176.        There  are  demos  with    sources available which will also
  177.        help to get you started, in recomended order of    interest:
  178.        vgatest(6),  keytest(6), mousetest(6), eventtest(6), fork-
  179.        test(6), bg_test(6), scrolltest(6), speedtest(6),  fun(6),
  180.        spin(6), testlinear(6), testgl(6), accel(6), testaccel(6),
  181.        plane(6), and wrapdemo(6).
  182.  
  183.        Debugging your programs will turn out to be rather  diffi-
  184.        cult,  because  the  svgalib  application  can not restore
  185.        textmode when it returns to the debugger.
  186.  
  187.        Happy are the users with a serial terminal, X-station,  or
  188.        another    way  to     log into the machine from network. These
  189.        can use
  190.  
  191.        textmode </dev/ttyN
  192.  
  193.  
  194.  
  195.  
  196. Svgalib 1.3.1         19 December 1998            3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. svgalib(7)           Svgalib User Manual           svgalib(7)
  203.  
  204.  
  205.        on the console where the program runs and continue.
  206.  
  207.        However, the vga_flip(3) function allows you to switch  to
  208.        textmode by entering a call to it blindly into your debug-
  209.        ger when your program stops in graphics mode.  vga_flip(3)
  210.        is  not    very  robust  though.  You shall not call it when
  211.        svgalib is not yet initialized or in textmode.
  212.  
  213.        Before  continuing  your     program,  you    must  then   call
  214.        vga_flip(3)  again to return to graphics mode. If the pro-
  215.        gram will not make any screen accesses  or  svgalib  calls
  216.        before  it  returns to the debugger, you can omit that, of
  217.        course.
  218.  
  219.        This will only work if your program and the  debugger  run
  220.        in the same virtual linux console.
  221.  
  222.  
  223. 3. DESCRIPTION OF SVGALIB FUNCTIONS
  224.        Each  function  has  it's own section 3 manual page. For a
  225.        list of vgagl functions see vgagl(7).
  226.  
  227.    Initialization
  228.        vga_init(3)
  229.           - initialize svgalib library.
  230.        vga_disabledriverreport(3)
  231.           - makes svgalib not emit any startup messages.
  232.        vga_claimvideomemory(3)
  233.           - declare the amount of video memory used.
  234.        vga_safety_fork(3)
  235.           - start a parallel process to restore  the  console
  236.           at a crash.
  237.        vga_setchipset(3)
  238.           - force chipset.
  239.        vga_setchipsetandfeatures(3)
  240.           - force chipset and optional parameters.
  241.  
  242.    Inquire hardware configuration
  243.        vga_getmousetype(3)
  244.           - returns the mouse type configured.
  245.        vga_getcurrentchipset(3)
  246.           - returns the current SVGA chipset.
  247.        vga_getmonitortype(3)
  248.           - returns the monitor type configured.
  249.  
  250.    Setting video modes
  251.        vga_setmode(3)
  252.           - sets a video mode.
  253.        vga_setdisplaystart(3)
  254.           - set the display start address.
  255.        vga_setlogicalwidth(3)
  256.           - set the logical scanline width.
  257.        vga_setlinearaddressing(3)
  258.           - switch to linear addressing mode.
  259.  
  260.  
  261.  
  262. Svgalib 1.3.1         19 December 1998            4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. svgalib(7)           Svgalib User Manual           svgalib(7)
  269.  
  270.  
  271.        vga_setmodeX(3)
  272.           - try to set Mode X-like memory organization .
  273.        vga_ext_set(3)
  274.           - set and query several extended features.
  275.        vga_screenoff(3), vga_screenon(3)
  276.           - turn generation of the video signal on or off.
  277.  
  278.    Get video mode information
  279.        vga_getxdim(3), vga_getydim(3), vga_getcolors(3)
  280.           - return the current screen resolution.
  281.        vga_white(3)
  282.           - return the color white in the current screen res-
  283.           olution.
  284.        vga_getcurrentmode(3)
  285.           - returns the current video mode.
  286.        vga_hasmode(3)
  287.           - returns if a video mode is supported.
  288.        vga_getmodeinfo(3)
  289.           - returns pointer to mode information structure for
  290.           a mode.
  291.        vga_getdefaultmode(3)
  292.           - returns the default graphics mode number.
  293.        vga_lastmodenumber(3)
  294.           - returns the last video mode number.
  295.        vga_getmodename(3)
  296.           - return a name for the given video mode.
  297.        vga_getmodenumber(3)
  298.           - return a number for the given video mode.
  299.  
  300.    Drawing primitives
  301.        vga_clear(3)
  302.           - clear the screen.
  303.        vga_setcolor(3)
  304.           - set the current color.
  305.        vga_setrgbcolor(3)
  306.           - set the current color.
  307.        vga_setegacolor(3)
  308.           - set the current color.
  309.        vga_drawpixel(3)
  310.           - draw a pixel on the screen.
  311.        vga_drawscanline(3)
  312.           - draw a horizontal line of pixels.
  313.        vga_drawscansegment(3)
  314.           - draw a horizontal line of pixels.
  315.        vga_drawline(3)
  316.           - draw a line on the screen.
  317.        vga_getpixel(3)
  318.           - get a pixels value from the screen.
  319.        vga_getscansegment(3)
  320.           - get a list of consecutive pixel values.
  321.        vga_waitretrace(3)
  322.           - wait for vertical retrace.
  323.  
  324.  
  325.  
  326.  
  327.  
  328. Svgalib 1.3.1         19 December 1998            5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. svgalib(7)           Svgalib User Manual           svgalib(7)
  335.  
  336.  
  337.    Basic (non raw) keyboard I/O
  338.        vga_getch(3)
  339.           - wait for a key.
  340.        vga_getkey(3)
  341.           -     read a character from the keyboard without wait-
  342.           ing.
  343.        vga_waitevent(3)
  344.           - wait for various I/O events.
  345.  
  346.    Direct VGA memory access
  347.        vga_setpage(3)
  348.           - set the 64K SVGA page number.
  349.        vga_setreadpage(3)
  350.           - set the 64K SVGA page number.
  351.        vga_setwritepage(3)
  352.           - set the 64K SVGA page number.
  353.        vga_getgraphmem(3)
  354.           - returns the address of the VGA memory.
  355.        vga_copytoplanar256(3)
  356.           - copy linear pixmap into Mode X video memory.
  357.        vga_copytoplanar16(3)
  358.           - copy linear pixmap into VGA 16 color  mode  video
  359.           memory.
  360.        vga_copytoplane(3)
  361.           - copy linear pixmap to some planes of VGA 16 color
  362.           mode video memory.
  363.  
  364.    Manage color lookup tables
  365.        vga_setpalette(3)
  366.           - set a color in the color lookup table.
  367.        vga_getpalette(3)
  368.           - get a color in the color lookup table.
  369.        vga_setpalvec(3)
  370.           - sets colors in the color lookup table.
  371.        vga_getpalvec(3)
  372.           - gets colors from the color lookup table.
  373.  
  374.    Mouse handling
  375.        vga_setmousesupport(3)
  376.           - enable mouse support.
  377.        mouse_init(3), mouse_init_return_fd(3)
  378.           - specifically initialize a mouse.
  379.        mouse_close(3)
  380.           - explicitly close a mouse.
  381.        mouse_update(3)
  382.           - updates the mouse state.
  383.        mouse_waitforupdate(3)
  384.           - wait for an mouse update.
  385.        mouse_setscale(3)
  386.           - sets a mouse scale factor.
  387.        mouse_setwrap(3)
  388.           - set what happens at the mouse boundaries.
  389.        mouse_setxrange(3), mouse_setyrange(3)
  390.           - define the boundaries for the mouse cursor.
  391.  
  392.  
  393.  
  394. Svgalib 1.3.1         19 December 1998            6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. svgalib(7)           Svgalib User Manual           svgalib(7)
  401.  
  402.  
  403.        mouse_getx(3), mouse_gety(3), mouse_getbutton(3)
  404.           - query the mouse state.
  405.        mouse_setposition(3)
  406.           - set the current mouse position.
  407.        mouse_getposition_6d(3),
  408.           mouse_setposition_6d(3), mouse_setrange_6d(3)
  409.           - provide an interface to 3d mice.
  410.        mouse_seteventhandler(3), mouse_setdefaulteventhandler(3)
  411.           - set a mouse event handler.
  412.  
  413.    Raw keyboard handling
  414.        keyboard_init(3), keyboard_init_return_fd(3)
  415.           - initialize the keyboard to raw mode.
  416.        keyboard_close(3)
  417.           - return the keyboard to normal operation from  raw
  418.           mode.
  419.        keyboard_update(3), keyboard_waitforupdate(3)
  420.           - process raw keyboard events.
  421.        keyboard_translatekeys(3)
  422.           - modify scancode mappings in raw keyboard mode.
  423.        keyboard_keypressed(3)
  424.           -     check    if  a key is pressed when in raw keyboard
  425.           mode.
  426.        keyboard_getstate(3)
  427.           - get a pointer to a buffer holding  the    state  of
  428.           all keys in raw keyboard mode.
  429.        keyboard_clearstate(3)
  430.           -     reset the state of all keys when in raw keyboard
  431.           mode.
  432.        keyboard_seteventhandler(3), key-
  433.           board_setdefaulteventhandler(3)
  434.           -     define     an  event handler for keyboard events in
  435.           raw mode.
  436.  
  437.    Joystick handling
  438.        joystick_init(3)
  439.           - initialize and calibrate joysticks.
  440.        joystick_close(3)
  441.           - close a joystick device.
  442.        joystick_update(3)
  443.           - query and process joystick state changes.
  444.        joystick_sethandler(3), joystick_setdefaulthandler(3)
  445.           - define own joystick even handler.
  446.        joystick_getnumaxes(3), joystick_getnumbuttons(3)
  447.           - query the capabilities of a joystick.
  448.        joystick_getaxis(3), joystick_getbutton(3)
  449.           - query the state of a joystick.
  450.        joystick_button1|2|3|4(3),     joystick_getb1|2|3|4(3),
  451.           joy- stick_x|y|z(3), joystick_getx|y|z(3)
  452.           - convenience macros to query  the  joystick  posi-
  453.           tion.
  454.  
  455.    Accelerator interface (new style)
  456.  
  457.  
  458.  
  459.  
  460. Svgalib 1.3.1         19 December 1998            7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. svgalib(7)           Svgalib User Manual           svgalib(7)
  467.  
  468.  
  469.        vga_accel(3)
  470.           - calls the graphics accelerator.
  471.  
  472.    Accelerator interface (old style)
  473.        vga_bitblt(3)
  474.           - copy pixmap on screen using an accelerator.
  475.        vga_fillblt(3)
  476.           - file rectangular area in video memory with a sin-
  477.           gle color.
  478.        vga_hlinelistblt(3)
  479.           - draw horizontal scan lines.
  480.        vga_imageblt(3)
  481.           - copy a rectangular pixmap from system  memory  to
  482.           video memory.
  483.        vga_blitwait(3)
  484.           - wait for any accelerator operation to finish.
  485.  
  486.    Controlling VC switches
  487.        vga_lockvc(3)
  488.           - disables virtual console switching for safety.
  489.        vga_unlockvc(3)
  490.           - re-enables virtual console switching.
  491.        vga_oktowrite(3)
  492.           -     indicates  whether the program has direct access
  493.           to the SVGA.
  494.        vga_runinbackground(3)
  495.           - enable running of the program while there  is  no
  496.           VGA access.
  497.        vga_runinbackground_version(3)
  498.           -     returns  the  version    of the current background
  499.           support.
  500.  
  501.    Debugging aids
  502.        vga_dumpregs(3)
  503.           - dump the contents of the SVGA registers.
  504.        vga_gettextfont(3), vga_puttextfont(3)
  505.           - get/set the font used in text mode.
  506.        vga_gettextmoderegs(3), vga_settextmoderegs(3)
  507.           - get/set the vga state used in text mode.
  508.        vga_flip(3)
  509.           - toggle between text and graphics mode.
  510.        vga_setflipchar(3)
  511.           - set the character causing a vga_flip().
  512.  
  513.  
  514.  
  515. 4. OVERVIEW OF SUPPORTED SVGA CHIPSETS AND MODES
  516.    VGA and compatibles
  517.        320x200x256, and the series of 16-color    and  non-standard
  518.        planar  256  color  modes  supported by VGAlib, as well as
  519.        720x348x2.
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526. Svgalib 1.3.1         19 December 1998            8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. svgalib(7)           Svgalib User Manual           svgalib(7)
  533.  
  534.  
  535.    ALI2301
  536.        Supports 640x480x256, 800x600x256, 1024x768x256 SVGA modes
  537.  
  538.  
  539.    AT3D (AT25)
  540.        Also  known as Promotion at25. Popular as the 2D part of a
  541.        voodoo rush card. As of this writing there are a few known
  542.        problems with this driver. Read below.
  543.  
  544.  
  545.    ARK Logic ARK1000PV/2000PV
  546.        Full  support,  limited    RAMDAC    support.  Only    ARK1000PV
  547.        tested. Supports Clocks and Ramdac lines in config file.
  548.  
  549.  
  550.    ATI SVGA (VGA Wonder and friends)
  551.        This is no real driver. I do not support     any  new  modes.
  552.        However it saves additional card setup and thus allows use
  553.        of the plain VGA modes even when you are using  non  stan-
  554.        dard  text  modes.  It  is possible to enforce use of this
  555.        driver even on ATI Mach32 but not very useful.
  556.  
  557.  
  558.    ATI Mach32
  559.        The driver by Michael Weller supports all ATI BIOS-defined
  560.        modes and more... It hits the best out of your card.  Some
  561.        modes may not have nice default timings but  it    uses  the
  562.        ATI's  EEPROM for custom config or allows to specify modes
  563.        in libvga.config(5).  Some problems may occur  with  quite
  564.        some  third  party  cards  (usually on board) Mach32 based
  565.        controllers as they  do    not  completely     conform  to  the
  566.        Mach32 data sheets.  Check out svgalib.mach32(7) (and lib-
  567.        vga.config(5)).
  568.  
  569.  
  570.    ATI Mach64
  571.        THIS IS A NON-FUNCTIONAL DRIVER. USE AT OWN RISK.
  572.  
  573.        Support for 640x480x256@60hz is being worked on.      At  the
  574.        moment it is only supposed to work with a the ATI WinTurbo
  575.        2MB VRAM VLB RAMDAC ATI68860.
  576.  
  577.  
  578.    Chips and Technologies chipsets 65525,  65535,  65546,  65548,
  579.        65550, and 65554 (usually in laptops).
  580.        This  server was written using the SVGALIB patch from Ser-
  581.        gio and Angelo Masci as a starting point. This version  of
  582.        the  code resembled the XFree server code that was used up
  583.        to XFree 3.1.2. As such it was  incapable  of  programming
  584.        the  clocks, using linear addressing, Hi-Color, True-Color
  585.        modes or the hardware acceleration. All of these     features
  586.        have  since  been  added to the code.  The 64200 and 64300
  587.        chips are unsupported, however these chips are very  simi-
  588.        lar to the 6554x chips which are supported.
  589.  
  590.  
  591.  
  592. Svgalib 1.3.1         19 December 1998            9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. svgalib(7)           Svgalib User Manual           svgalib(7)
  599.  
  600.  
  601.    Cirrus Logic GD542x/3x
  602.        All  the     modes,     including  256 color, 32K/64K color, 16M
  603.        color (3 bytes per pixel) and 32-bit pixel 16M color modes
  604.        (5434).    Some  bitblt functions are supported.  The driver
  605.        doesn't work with mode dumps, but uses a SVGA  abstraction
  606.        with mode timings like the X drivers.
  607.  
  608.  
  609.    Genoa(?) GVGA6400 cards.
  610.        Supported.
  611.  
  612.  
  613.    Hercules Stingray 64/Video
  614.        Is supported as an ARK2000PV
  615.  
  616.  
  617.    NV3 driver for the Riva128.
  618.        This    driver      was     written    by      Matan       Ziv-Av
  619.        <zivav@cs.bgu.ac.il>  and  is  derived  from  the  XFree86
  620.        driver  by  David  J. Mckay. It lacks 24bit modes (can the
  621.        card do them at all?), acceleration support and    pageflip-
  622.        ping in threeDKit is broken.
  623.  
  624.  
  625.    Oak Technologies OTI-037/67/77/87
  626.        Driver  by Christopher Wiles; includes 32K color modes for
  627.        OTI-087.
  628.  
  629.  
  630.    S3
  631.        The driver is not complete, but should work on a number of
  632.        cards/RAMDACs,  and  640x480x256 should work on most card.
  633.        The   best    support    is    for    a      801/805    with
  634.        AT&T20C490-compatible  RAMDAC,  and  S3-864  +  SDAC.  All
  635.        256/32K/64K/16M works for them (within the bounds of video
  636.        memory & ramdac restrictions).
  637.  
  638.        The  supported cards include S3 Virge and S3 Trio64 cards.
  639.  
  640.        None of the acceleration function is supported yet.
  641.  
  642.        The chip level code should work with the 964/868/968,  but
  643.        most likely the card they come on would use an unsupported
  644.        ramdac/clock chip.  Support  for     these    chips  is  slowly
  645.        being added.
  646.  
  647.        Clocks and Ramdac lines in libvga.config(5) supported.
  648.  
  649.        The  maximum pixel clock (in MHz) of the ramdac can be set
  650.        using a Dacspeed line in the  config  file.  A  reasonable
  651.        default    is  assumed  if     the  Dacspeed    line  is omitted.
  652.        Clocks should be the same as in XFree86. Supported  ramdac
  653.        IDs:   Sierra32K,   SC15025,   SDAC,   GenDAC,  ATT20C490,
  654.        ATT20C498, IBMRGB52x.
  655.  
  656.  
  657.  
  658. Svgalib 1.3.1         19 December 1998               10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. svgalib(7)           Svgalib User Manual           svgalib(7)
  665.  
  666.  
  667.        Example:
  668.        Clocks 25.175 28.3 40 70 50 75 36 44.9 0 118 77    31.5  110
  669.        65 72 93.5
  670.        Ramdac att20c490
  671.        DacSpeed 85
  672.  
  673.        Also   supported,   at    least  in  combination    with  the
  674.        SC15025/26A ramdac, is the ICD 2061A clock chip.     Since it
  675.        cannot be autodetected you need to define it in the config
  676.        file using a Clockchip line. As there is no  way     to  read
  677.        the  current settings out of the 2061, you have the option
  678.        to specify the frequency used when switching back to  text
  679.        mode as second argument in the Clockchip line.
  680.  
  681.        This  is     especially  required if your text mode is an 132
  682.        column mode, since these modes use a clock from the  clock
  683.        chip,  while  80 column modes use a fixed clock of 25 MHz.
  684.        The text mode frequency defaults to 40 MHz, if omitted.
  685.  
  686.        Example:
  687.        ClockChip icd2061a 40.0
  688.  
  689.  
  690.    Trident TVGA 8900C/9000 (and possibly also 8800CS/8900A/B) and
  691.        also TVGA 9440
  692.        Derived from tvgalib by Toomas Losin. TVGA 9440 support by
  693.        ARK <ark@lhq.com, root@ark.dyn.ml.or>.
  694.  
  695.        Supports 640x480x256,  800x600x256,  1024x768x256  (inter-
  696.        laced  and non-interlaced) Might be useful to add 16-color
  697.        modes (for those equipped with a 512K  TVGA9000)     for  the
  698.        8900 and 9000 cards.
  699.  
  700.        320x200x{32K,  64K,  16M},  640x480x{256,  32K, 64K, 16M},
  701.        800x600x{256,  32K,   64K,   16M},   1024x768x{16,   256},
  702.        800x600x{16,  256,  32K,     64K} modes are supported for the
  703.        TVGA 9440.
  704.  
  705.        Autodetection can be forced with a:
  706.  
  707.           chipset TVGA memory flags
  708.  
  709.        line in the config file.
  710.  
  711.        memory is the amount of VGA memory in KB,  flags     is  com-
  712.        posed of three bits:
  713.  
  714.           bit2 = false, bit1 = false
  715.              force 8900.
  716.  
  717.           bit2 = false, bit1 = true
  718.              force 9440.
  719.  
  720.  
  721.  
  722.  
  723.  
  724. Svgalib 1.3.1         19 December 1998               11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. svgalib(7)           Svgalib User Manual           svgalib(7)
  731.  
  732.  
  733.           bit2 = true, bit1 = false
  734.              force 9680.
  735.  
  736.           bit0 = true
  737.              force noninterlaced.
  738.  
  739.           bit0 = false
  740.              force   interlaced     which    only  matters  on
  741.              8900's with at least 1M since  there  is  no
  742.              512K  interlaced  mode on the 8900 or any of
  743.              the other cards.
  744.  
  745.  
  746.    Tseng ET4000/ET4000W32(i/p)
  747.        Derived from VGAlib; not the same register values.  ET4000
  748.        register values are not compatible; see svgalib.et4000(7).
  749.  
  750.        Make sure the colors are right in hicolor mode; the  vgat-
  751.        est  program  should  draw the same color bars for 256 and
  752.        hicolor modes (the DAC type is defined at  compilation  in
  753.        et4000.regs  or    the  dynamic registers file).  ET4000/W32
  754.        based cards usually have an AT&T or  Sierra  15025/6  DAC.
  755.        With  recent  W32p  based  cards, you might have some luck
  756.        with the AT&T DAC type.     If  the  high    resolution  modes
  757.        don't work, you can try dumping the registers in DOS using
  758.        the program in the et4000/ directory and putting them in a
  759.        file  (/etc/vga/libvga.et4000  is  parsed  at  runtime  if
  760.        DYNAMIC is defined in Makefile.cfg at compilation (this is
  761.        default)).
  762.  
  763.        Supported     modes    are    640x480x256,    800x600x256,
  764.        1024x768x256, 640x480x32K, 800x600x32K, 640x480x16M,  etc.
  765.  
  766.        Reports of ET4000/W32i/p functionality are welcome.
  767.  
  768.        There may be a problem with the way the hicolor DAC regis-
  769.        ter is handled; dumped registers may use one of two timing
  770.        methods, with the value written to the register for a par-
  771.        ticular DAC for a hicolor mode (in vgahico.c)  being  cor-
  772.        rect  for  just one of the these methods. As a consequence
  773.        some dumped resolutions may work while others don't.
  774.  
  775.  
  776.    Tseng ET6000
  777.        At present the supported modes are:
  778.  
  779.        320x200x32K    640x480x256     640x480x32K     640x480x64K
  780.        640x480x16M     800x600x256     800x600x32K    800x600x64K
  781.        1024x768x256
  782.  
  783.        The ET6000 has a built in DAC and there is no problem com-
  784.        ming  from  that     area. The ET6000 is capable of accelera-
  785.        tion, but this is not yet implemented in the driver.  Once
  786.        acceleration is working, more modes will be developed.
  787.  
  788.  
  789.  
  790. Svgalib 1.3.1         19 December 1998               12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. svgalib(7)           Svgalib User Manual           svgalib(7)
  797.  
  798.  
  799.        The  driver  is written so that new modes may be developed
  800.        using the optional /etc/vga/libvga.et6000 file  which  may
  801.        be  configured.    This  is  discussed in svgalib.et6000(7).
  802.        ET6000 driver does not use mode lines.
  803.  
  804.        This driver was provided by Don Secrest.
  805.  
  806.  
  807.    VESA
  808.        Please read README.vesa and README.lrmi in  doc    subdirec-
  809.        tory of the standard distribution.
  810.  
  811.        Go figure! I turned off autodetection in the release, as a
  812.        broken  bios  will  be  called  too,  maybe  crashing  the
  813.        machine.     Enforce  VESA    mode by putting a chipset VESA in
  814.        the end of your libvga.config(5).
  815.  
  816.        Note that it will leave protected mode and call the  cards
  817.        bios opening the door to many hazards.
  818.  
  819.  
  820. 5. DETAILED COMMENTS ON CERTAIN DEVICE DRIVERS
  821.        This  section contains detailed information by the authors
  822.        on certain chipsets.
  823.  
  824.  
  825.    AT3D (AT25)
  826.        Also known as Promotion at25. Popular as the 2D part of    a
  827.        voodoo rush card.
  828.  
  829.        I  have    written     a  driver for this chipset, based on the
  830.        XF86 driver for this chipset.
  831.  
  832.        The programs that work with this driver    include     all  the
  833.        programs in the demos directory, zgv and dvisvga (tmview).
  834.  
  835.        I believe it should be easy  to    make  it  work    on  AT24,
  836.        AT6422.
  837.  
  838.        There are still the following problems:
  839.  
  840.           *         Svga   320x200   modes   don't   work.  (but
  841.              320x200x8, vga works).
  842.  
  843.           *         Pageflipping (in threeDKit) does not work.
  844.  
  845.           *         No acceleration (is  there     a  program  that
  846.              uses it anyway?).
  847.  
  848.           *         Sometimes    does  not  restore  textfont when
  849.              going  back  to  textmode    (or   maybe   the
  850.              palette).
  851.  
  852.        Matan Ziv-Av <zivav@cs.bgu.ac.il>
  853.  
  854.  
  855.  
  856. Svgalib 1.3.1         19 December 1998               13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. svgalib(7)           Svgalib User Manual           svgalib(7)
  863.  
  864.  
  865.    ATI Mach32
  866.        Please see svgalib.mach32(7).
  867.  
  868.  
  869.    ATI Mach64
  870.        NOTE!
  871.        Because    of  the     problems  with Mach64 it's autodetection
  872.        (though working) is  disabled.  Please  place  a     `chipset
  873.        Mach64'    at  the     end of /etc/vga/libvga.config to enforce
  874.        detection of a Mach64 when you have read     all  the  Mach64
  875.        docs and still wan't to try it.
  876.  
  877.        Mach64 Driver for SVGALIB. March 17/96
  878.  
  879.        Pre-alpha driver... could we get any worse than that? :)
  880.  
  881.        USE  AT    OWN RISK... DO NOT USE IN CONJUNCTION WITH X WIN-
  882.        DOWS...    DOES NOT WORK PROPERLY...  MAY    DAMAGE    SYSTEM...
  883.        NEED HELP IN MAKING IT WORK.
  884.  
  885.        Hi. I've working on this on and off since August with min-
  886.        imal progress.  I could really use some help... I seem  to
  887.        be stumped with my problems.
  888.  
  889.        At the moment this driver is only supposed to work with my
  890.        board since I did not include any general ramdac     program-
  891.        ming or memory checking.
  892.  
  893.        ATI WINTURBO 2MB VRAM w/ 18818 clock and ATI 68860 RAMDAC.
  894.        Essentially if the first Mach64    XServer     worked     or  your
  895.        board is old then it may be ok.
  896.  
  897.        I've  used  both the ATI Mach64 SDK and the XFree86 server
  898.        to try and write this.    What  I     get  now  is  a  corrupt
  899.        screen...  Its's offset at every 64k page and it has black
  900.        vertical stripes running down it.  No there  is    no  smoke
  901.        from the monitor.
  902.  
  903.        Its  640x480  with  a 25Mhz dot clock.  Actually its clock
  904.        select 8 - which is the default setting of reserved.
  905.  
  906.        I use the default clock setting of 8.  This works ok on    a
  907.        system  that  was  cold booted and did not do any graphics
  908.        activity.  If there was graphics activity such as X.  Then
  909.        the display will look shrunken.    The only reason I used 8,
  910.        was that at the time it produced a  decent  picture.   You
  911.        may  want  to  uncomment the lines in the crtc programming
  912.        that set the clock to 0x00|0x10    ...  this  is  50Mhz  and
  913.        divide by 2.
  914.  
  915.        I  checked and messed with the dac and crtc programming to
  916.        no avail.
  917.  
  918.        The way I want to write the  driver  is    as  follows:  The
  919.  
  920.  
  921.  
  922. Svgalib 1.3.1         19 December 1998               14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. svgalib(7)           Svgalib User Manual           svgalib(7)
  929.  
  930.  
  931.        mach64  has  an accelerator a vga/extended vga controller.
  932.        In order to use any of the  fancy  acclerated  features    I
  933.        have  to     use the accelerator.  So I totally disregard the
  934.        vga/extended vga, and put it into accelerator mode.  I use
  935.        the  accelerators  CRTC, DAC, and CLOCK registers to setup
  936.        the display mode.  It seems to work...  but  something  is
  937.        wrong  somewhere     causeing  the    screen to become corrupt.
  938.        Note: I did set some vga registers but they don't seem  to
  939.        do  anything.   The  only  crucial  one is the 128k memory
  940.        block setting.  This allows access to  memory  mapped  gui
  941.        registers.
  942.  
  943.        There are three ways to do bank switching:
  944.  
  945.        1.     Use  the    extended vga registers for 64k page flip-
  946.           ping.  This is only used in standard vga.
  947.  
  948.        2.     Use  the dual 32k     pages.      This    is  available  in
  949.           standard vga and accelerator modes.
  950.  
  951.        3.     Linear aperature.
  952.  
  953.  
  954.        For  the     time  being  I'm gonna use #2 and eventually #3.
  955.        For #2 you use the MEM_VGA_* registers.    OF course when    I
  956.        set  page  0  nothing appears...     flip it to 255 something
  957.        happens... argh.
  958.  
  959.        Saving/setting registers... I didn't  pay  much    attention
  960.        here  yet since I only touch a few vga registers.  Running
  961.        the X server and this driver at this time  may  be  lethal
  962.        since  I     turn  off the linear aperature that the X server
  963.        uses... and I never turn it back on.   It  only    sets  the
  964.        registers necessary for a non-corrupt textmode.
  965.  
  966.        So  essentially I need help in figuring out why my display
  967.        is corrupt and enlightenment on    why  when  I  switch  the
  968.        banks it writes to the same part of the screen.
  969.  
  970.        Asad Hanif
  971.        w81h@unb.ca
  972.        (Til June/96)
  973.  
  974.        Michael    Weller:     Development of that driver seems to have
  975.        ceased. If you are interested, take over.
  976.  
  977.  
  978.    Chips and Technologies chipsets 65525,  65535,  65546,  65548,
  979.        65550, and 65554 (usually in laptops).
  980.        Please see svgalib.chips(7).
  981.  
  982.  
  983.    Tseng ET4000/ET4000W32(i/p)
  984.        Please see svgalib.et4000(7).
  985.  
  986.  
  987.  
  988. Svgalib 1.3.1         19 December 1998               15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. svgalib(7)           Svgalib User Manual           svgalib(7)
  995.  
  996.  
  997.    Tseng ET6000
  998.        I  have only 2 Mbytes of memory on my ET6000 card, so I am
  999.        not able to get all posible modes running. I haven't  even
  1000.        tried  to do all of the modes which I am capable of doing,
  1001.        but I am confident that I can manage  more  modes  when    I
  1002.        have  time.  I  have enough modes working to make the card
  1003.        useful, so I felt it was worth while to add the driver  to
  1004.        svgalib now.
  1005.  
  1006.        Linear  graphics     is  working  on this card, both with and
  1007.        without BACKGROUND enabled.  With ONE_MAP defined in Make-
  1008.        file.cfg     linear works and the video memory is only mapped
  1009.        once.  If many different modes are going to be used in one
  1010.        program,     this is important.  Without ONE_MAP defined lin-
  1011.        ear works fine, but every time a     new  mode  is    used  the
  1012.        mapped memory is given a new pointer.
  1013.  
  1014.        I  decided  it  was best to quit working on more modes and
  1015.        try to get acceleration working.
  1016.  
  1017.        My et6000 card is on a PCI bus, about which  I  know  very
  1018.        little. The card will run on a vesa bus, but since I don't
  1019.        have one on my machine I couldn't develope vesa    bus  han-
  1020.        dling.  I  got  information on the PCI bus by reading pro-
  1021.        grams which used the PCI bus in XFree86. It  apears  there
  1022.        are 2 PCI bus types. I test for type 1 and 2. Mine is type
  1023.        1, and I do not know how to read type 2. I quit if the PCI
  1024.        bus is type 2 or a vesa bus.
  1025.  
  1026.        I  check     for  an  et6000 card, which can be unequivocally
  1027.        identified. The et4000 driver does not  properly     identify
  1028.        et4000  cards. It thinks the et6000 card is an et4000, but
  1029.        can only run it in vga modes.
  1030.  
  1031.        Please see svgalib.et6000(7).
  1032.  
  1033.        Don Secrest <secrest@uiuc.edu> Oct 21, 1998
  1034.  
  1035.  
  1036.  
  1037.    Oak Technologies OTI-037/67/77/87
  1038.        First a few comments of me  (Michael  Weller  <eowmob@exp-
  1039.        math.uni-essen.de>):
  1040.  
  1041.        As  of  this  writing  (1.2.8)  fixes were made to the oak
  1042.        driver by  Frodo     Looijaard  <frodol@dds.nl>  to     reenable
  1043.        OTI-067    support.  It  is  unknown right now if they might
  1044.        have broken OTI-087 support. The author of the '87 support
  1045.        Christopher  Wiles  <wileyc@moscow.com>    owns no longer an
  1046.        OTI-087 card and can thus no longer give     optimal  support
  1047.        to this driver. Thus you might be better off contacting me
  1048.        or Frodo for questions. If you are a knowledgable  OTI-087
  1049.        user  and  experience  problems you are welcome to provide
  1050.        fixes.  No user of a OTI-087 is currently known to me,  so
  1051.  
  1052.  
  1053.  
  1054. Svgalib 1.3.1         19 December 1998               16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. svgalib(7)           Svgalib User Manual           svgalib(7)
  1061.  
  1062.  
  1063.        if  you are able to fix problems with the driver please do
  1064.        so (and contact me) as noone else can.
  1065.  
  1066.        Michael.
  1067.  
  1068.        Now back to the original Oak information:
  1069.  
  1070.        The original OTI driver, which supported the OTI-067/77 at
  1071.        640x480x256,  has  been    augmented with the following fea-
  1072.        tures:
  1073.  
  1074.  
  1075.        1)     Supported resolutions/colors have been expanded  to
  1076.           640x480x32K,   800x600x256/32K,  1024x768x256,  and
  1077.           1280x1024x16.
  1078.  
  1079.        2)     The OTI-087 (all variants) is now supported.  Video
  1080.           memory is correctly recognized.
  1081.  
  1082.  
  1083.        The  driver as it exists now is somewhat schizoid.  As the
  1084.        '87 incorporates a completely different    set  of     extended
  1085.        registers, I found it necessary to split its routines from
  1086.        the others.  Further, I did not have access  to    either    a
  1087.        '67  or    a  '77 for testing the new resolutions.     If using
  1088.        them causes your monitor/video card to fry,  your  dog  to
  1089.        bite you, and so forth, I warned you.  The driver works on
  1090.        my '87, and that's all I guarantee.  Period.
  1091.  
  1092.        Heh.  Now, if someone wants to try them    out  ...  let  me
  1093.        know if they work.
  1094.  
  1095.        New from last release:
  1096.  
  1097.        32K  modes now work for 640x480 and 800x600.  I found that
  1098.        the Sierra DAC information in VGADOC3.ZIP is, well, wrong.
  1099.        But,  then  again,  the    information for the '87 was wrong
  1100.        also.
  1101.  
  1102.        64K modes do not work.  I can't even  get  Oak's     BIOS  to
  1103.        enter those modes.
  1104.  
  1105.        I  have included a 1280x1024x16 mode, but I haven't tested
  1106.        it.  My monitor can't handle that  resolution.    According
  1107.        to  the    documentation, with 2 megs the '87 should be able
  1108.        to do an interlaced 1280x1024x256 ...  again,  I     couldn't
  1109.        get  the BIOS to do the mode.  I haven't 2 megs anyway, so
  1110.        there it sits.
  1111.  
  1112.        I have included routines for entering and  leaving  linear
  1113.        mode.   They should work, but they don't.  It looks like a
  1114.        pointer to  the    frame  buffer  is  not    being  passed  to
  1115.        SVGALIB.      I've    been  fighting with this one for a month.
  1116.        If anyone wants to play with this, let me know if  it  can
  1117.  
  1118.  
  1119.  
  1120. Svgalib 1.3.1         19 December 1998               17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. svgalib(7)           Svgalib User Manual           svgalib(7)
  1127.  
  1128.  
  1129.        be make to work.     I've got exams that I need to pass.
  1130.  
  1131.        Tidbit:    I  pulled  the    extended register info out of the
  1132.        video BIOS.  When the information thus obtained failed  to
  1133.        work,  I     procured the OTI-087 data book.  It appears that
  1134.        Oak's video BIOS sets various modes incorrectly (e.g. set-
  1135.        ting 8-bit color as 4, wrong dot clock frequencies, etc.).
  1136.        Sort of makes me wonder ...
  1137.  
  1138.        Christopher M. Wiles (a0017097@wsuaix.csc.wsu.edu)
  1139.        12 September 1994
  1140.  
  1141.  
  1142. 6. GOALS
  1143.        I think the ability to use a VGA/SVGA graphics  resolution
  1144.        in  one virtual     console, and being able to switch to any
  1145.        other virtual console  and  back     makes    a  fairly  useful
  1146.        implementation of graphics modes in the Linux console.
  1147.  
  1148.        Programs     that  use  svgalib  must be setuid root. I don't
  1149.        know how desirable it is to have this changed; direct port
  1150.        access can hardly be done without. Root privileges can now
  1151.        be given up right after    initialization.     I  noticed  some
  1152.        unimplemented stuff in the kernel header files that may be
  1153.        useful, although doing all register  I/O     via  the  kernel
  1154.        would  incur  a significant context-switching overhead. An
  1155.        alternative might be to have a pseudo /dev/vga device that
  1156.        yields  the  required  permissions when opened, the device
  1157.        being readable by programs in group vga.
  1158.  
  1159.        It is important that textmode  is  restored  properly  and
  1160.        reliably;  it  is  fairly reliable at the moment, but fast
  1161.        console switching back and forth between two consoles run-
  1162.        ning  graphics  can  give  problems.  Wild virtual console
  1163.        switching also sometimes     corrupts  the    contents  of  the
  1164.        textmode     screen     buffer     (not  the  textmode registers or
  1165.        font).  Also if a program crashes it may     write    into  the
  1166.        area  where the saved textmode registers are stored, caus-
  1167.        ing textmode not be restored correctly. It would be a good
  1168.        idea  to     somehow  store this information in a 'safe' area
  1169.        (say a kernel buffer). Note  that  the  vga_safety_fork(3)
  1170.        thing has the same idea.
  1171.  
  1172.        Currently,  programs  that  are    in graphics mode are sus-
  1173.        pended while not in the current virtual console. Would  it
  1174.        be a good idea to let them run in the background, virtual-
  1175.        izing framebuffer actions (this should not be too hard for
  1176.        linear  banked SVGA modes)? It would be nice to have, say,
  1177.        a raytracer with a real-time display run in the background
  1178.        (although  just using a separate real-time viewing program
  1179.        is much more elegant).
  1180.  
  1181.        Anyone wanting to rewrite it all in a cleaner  way  (some-
  1182.        thing   with   loadable     kernel     modules  shouldn't  hurt
  1183.  
  1184.  
  1185.  
  1186. Svgalib 1.3.1         19 December 1998               18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. svgalib(7)           Svgalib User Manual           svgalib(7)
  1193.  
  1194.  
  1195.        performance with linear    framebuffer/vgagl  type     applica-
  1196.        tions) is encouraged.
  1197.  
  1198.        Also, if anyone feels really strongly about a low-resource
  1199.        and truecolor supporting graphical window environment with
  1200.        cut-and-paste,  I  believe it would be surprisingly little
  1201.        work to come up with a  simple  but  very  useful  client-
  1202.        server  system  with  shmem,  the most useful applications
  1203.        being fairly trivial to write (e.g. shell window,   bitmap
  1204.        viewer). And many X apps would port trivially.
  1205.  
  1206.        This   is   old     information,  please  be  sure     to  read
  1207.        svgalib.faq(7) if you are interested in further goals.
  1208.  
  1209.  
  1210. 7. REFERENCES
  1211.        The latest  version  of    svgalib     can  be  found     on  sun-
  1212.        site.unc.edu in /pub/Linux/libs/graphics or tsx-11.mit.edu
  1213.        in /pub/linux/sources/libs as svgalib-X.X.X.tar.gz.  As of
  1214.        this  writing  the latest version is svgalib-1.3.1.tar.gz.
  1215.        There are countless mirrors of these ftp     servers  in  the
  1216.        world. Certainly a server close to you will carry it.
  1217.  
  1218.        The     original        VGAlib    is    on      tsx-11.mit.edu,
  1219.        pub/linux/sources/libs/vgalib12.tar.Z.    tvgalib-1.0.tar.Z
  1220.        is in the same directory.
  1221.  
  1222.        SLS  has     long been distributing an old version of VGAlib.
  1223.        Slackware keeps a fairly up-to-date  version  of     svgalib,
  1224.        but it may be installed in different directories from what
  1225.        svgalib likes  to  do  by  default.  The     current  svgalib
  1226.        install    tries  to  remove  most     of this. It also removes
  1227.        /usr/bin/setmclk and /usr/bin/convfont, which is     a  secu-
  1228.        rity  risk  if  setuid-root. Actually the recent makefiles
  1229.        try to do a really good job to cleanup the mess which some
  1230.        distributions make.
  1231.  
  1232.        If  you    want  to  recompile the a.out shared library, you
  1233.        will   need   the   DLL     'tools'   package   (found    on
  1234.        tsx-11.mit.edu, GCC dir).  To make it work with recent ELF
  1235.        compiler's you actually need to hand patch it. You  should
  1236.        probably     not try to compile it. Compiling the ELF library
  1237.        is deadly simple.
  1238.  
  1239.        And here is a list of other references which  is     horribly
  1240.        outdated.   There  are  many  more svgalib applications as
  1241.        well as the  directories     might    have  changed.     However,
  1242.        these will give you a start point and names to hunt for on
  1243.        CD's or in ftp archives.
  1244.  
  1245.  
  1246.    Viewers   (in   /pub/Linux/apps/graphics/viewers    on    sun-
  1247.        site.unc.edu):
  1248.        spic   Picture  viewer; JPG/PPM/GIF; truecolor; scrolling.
  1249.  
  1250.  
  1251.  
  1252. Svgalib 1.3.1         19 December 1998               19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. svgalib(7)           Svgalib User Manual           svgalib(7)
  1259.  
  1260.  
  1261.        zgv    Full-featured viewer with nice file selector.
  1262.        see-jpeg
  1263.           Shows picture as it is being built up.
  1264.        mpeg-linux
  1265.           svgalib  port  of      the    Berkeley   MPEG      decoder
  1266.           (mpeg_play); it also includes an X binary.
  1267.        flip   FLI/FLC player (supports SVGA-resolution).
  1268.  
  1269.  
  1270.    Games (in /pub/Linux/games on sunsite.unc.edu):
  1271.        bdash  B*lderdash clone with sound.
  1272.        sasteroids
  1273.           Very smooth arcade asteroids game.
  1274.        yatzy  Neat mouse controlled dice game.
  1275.        vga_cardgames
  1276.           Collection of graphical card games.
  1277.        vga_gamespack
  1278.           Connect4, othello and mines.
  1279.        wt     Free state-of-the-art Doom-like engine.
  1280.        Maelstrom
  1281.           A very nice asteroids style game port from Mac.
  1282.        Koules A game. (I've no idea what it looks like)
  1283.  
  1284.  
  1285.    Docs
  1286.        In the vga directory of the SIMTEL MSDOS collection, there
  1287.        is a package called  vgadoc3  which  is    a  collection  of
  1288.        VGA/SVGA register information.
  1289.  
  1290.        The  XFree86  driver sources distributed with the link-kit
  1291.        may be helpful.
  1292.  
  1293.  
  1294.    Miscellaneous
  1295.        There's an alternative RAW-mode keyboard library     by  Rus-
  1296.        sell Marks for use with svgalib on sunsite.unc.edu.
  1297.  
  1298.        LIBGRX,    the  extensive framebuffer library by Csaba Biegl
  1299.        distributed with DJGPP, has been ported to Linux.  Contact
  1300.        Hartmut    Schirmer (phc27@rz.uni-kiel.d400.de, subject pre-
  1301.        fix "HARTMUT:"). A more up-to-date port by Daniel  Jackson
  1302.        (djackson@icomp.intel.com) is on sunsite.unc.edu.
  1303.  
  1304.        The  vgalib ghostscript device driver sources can be found
  1305.        on sunsite.unc.edu, /pub/Linux/apps/graphics.  Ghostscript
  1306.        patches    from  Slackware:  ftp.cdrom.com, /pub/linux/misc.
  1307.        gnuplot patches are on sunsite.unc.edu.
  1308.  
  1309.        Mitch D'Souza has written font functions that work  in  16
  1310.        color  modes  and  can  use VGA textmode (codepage format)
  1311.        fonts; these can be found in his     g3fax    package     in  sun-
  1312.        site.unc.edu.  These functions may go into a later version
  1313.        of svgalib.
  1314.  
  1315.  
  1316.  
  1317.  
  1318. Svgalib 1.3.1         19 December 1998               20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. svgalib(7)           Svgalib User Manual           svgalib(7)
  1325.  
  1326.  
  1327. 8. KNOWN BUGS
  1328.        This section is most  probably  outdated,  none    of  these
  1329.        problems are no longer reported.
  1330.  
  1331.        Using  a     132  column textmode may cause graphics modes to
  1332.        fail. Try using something like 80x28.
  1333.  
  1334.        The console switching doesn't preserve some registers that
  1335.        may be used to draw in planar VGA modes.
  1336.  
  1337.        Wild  console  switching     can  cause the text screen to be
  1338.        corrupted, especially when switching between two     graphics
  1339.        consoles.
  1340.  
  1341.        On  ET4000,  having  run XFree86 may cause high resolution
  1342.        modes to fail (this is more XFree86's fault).
  1343.  
  1344.        The Trident probing routine  in    the  XFree86  server  may
  1345.        cause standard VGA modes to fail after exiting X on a Cir-
  1346.        rus. Try putting a 'Chipset' line in your Xconfig to avoid
  1347.        the  Trident  probe, or use the link kit to build a server
  1348.        without the  Trident  driver.  Saving  and  restoring  the
  1349.        textmode     registers  with  savetextmode/textmode (restore-
  1350.        textmode) should also work. [Note: svgalib now resets  the
  1351.        particular  extended  register,    but  only  if  the Cirrus
  1352.        driver is used (i.e. the chipset is not    forced    to  VGA)]
  1353.        [This is fixed in XFree86 v2.1]
  1354.  
  1355.        Some  Paradise VGA cards may not work even in standard VGA
  1356.        modes. Can anyone confirm this?
  1357.  
  1358.        Piping data into a graphics program has problems. I am not
  1359.        sure  why. A pity, since zcatting a 5Mb FLC file into flip
  1360.        on a 4Mb machine would be fun.
  1361.  
  1362.        The tseng3.exe  DOS  program  include  as  source  in  the
  1363.        svgalib    distribution  doesn't recognize any modes on some
  1364.        ET4000 cards.  Also ET4000 cards with a Acumos/Cirrus  DAC
  1365.        may only work correctly in 64K color mode.
  1366.  
  1367.  
  1368. FILES
  1369.        /etc/vga/libvga.config
  1370.        /etc/vga/libvga.et4000
  1371.        /etc/vga/libvga.et6000
  1372.  
  1373.  
  1374. SEE ALSO
  1375.        svgalib.et4000(7),   svgalib.et6000(7),    svgalib.chips(7),
  1376.        svgalib.mach32(7),  vgagl(7),   libvga.config(5),   3d(6),
  1377.        accel(6),  bg_test(6),  eventtest(6), forktest(6), fun(6),
  1378.        keytest(6), mousetest(6), joytest(6), mjoytest(6), scroll-
  1379.        test(6),     speedtest(6),    spin(6), testaccel(6), testgl(6),
  1380.        testlinear(6),     vgatest(6),    plane(6),    wrapdemo(6),
  1381.  
  1382.  
  1383.  
  1384. Svgalib 1.3.1         19 December 1998               21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. svgalib(7)           Svgalib User Manual           svgalib(7)
  1391.  
  1392.  
  1393.        convfont(1),   dumpreg(1),  fix132x43(1),  restorefont(1),
  1394.        restorepalette(1),      restoretextmode(1),     runx(1),
  1395.        savetextmode(1), setmclk(1), textmode(1), mach32info(1).
  1396.  
  1397.  
  1398. AUTHOR
  1399.        There are many authors of svgalib. This page was edited by
  1400.        Michael    Weller    <eowmob@exp-math.uni-essen.de>    who  cur-
  1401.        rently  maintains svgalib.  The original documentation and
  1402.        most   of   svgalib   was   done      by   Harm    Hanemaayer
  1403.        <H.Hanemaayer@inter.nl.net> though.
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450. Svgalib 1.3.1         19 December 1998               22
  1451.  
  1452.  
  1453.